

//项目根组件

import React from 'react'
//路由
import { HashRouter, Route, Link} from 'react-router-dom'
//context状态管理
import PropTypes from 'prop-types'



//导入
// import routes from './router/router.js'
import Home from './components/home.jsx'
import List from './components/list.jsx'
import Hello from './components/Hello.jsx'
import Comment from './components/comment/ CommentApp.jsx'
import Header from './components/store/Header'
import Content from './components/store/Content'
import store from './components/store/Reactredux'
import { Provider } from './components/store/Connect'







//样式
import styles from './css/app.css'
import CommentApp from './components/comment/ CommentApp.jsx'







class App extends React.Component {

  
  constructor(props) {
        super(props)
        this.state = {
          value: 1,
        };
    
        
    };

    
    render() {
        return <HashRouter>
 {/* --------------------------react-redux------------------ */}
    {/* <Provider store={store}>
     <Header></Header>
        <Content></Content>
        </Provider> */}
           
           
          
          {/* <CommentApp></CommentApp> */}

        {/* --------------------路由嵌套------------------------ */}
          {/* <Hello></Hello>
           <Home></Home>
           <List></List> */}
                {/* <Link to="/">首页组件</Link>
                <Link to="/use">用户页面</Link>
                <Link to="/list">列表</Link>


            {
              routes.map((route,key)=>{

                  if(route.exact){

                    return <Route key={key} exact path={route.path}                     

                    render={props => (
                      <route.component {...props} routes={route.routes} />
                    )}

                    />
                  }else{
                    return <Route  key={key}  path={route.path} 
                    render={props => (
                      <route.component {...props} routes={route.routes} />
                    )}
                    />

                  }
              })
            }             */}
          
        {/* -----------------------------练习------------------------------- */}
         


        </HashRouter>
    }
}

export default App
